import { getProxyCode } from '../../../utils/networkRequest.js'
import {
  errorMsg
} from '../../../utils/tool.js'
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let self = this;
    let teamId = options.team_id ? options.team_id : "";
    getProxyCode(teamId,2,(r)=>{
      if (r.code == 0) {
        self.setData({
          dataInfo: r.data
        })
      } else {
        errorMsg(r.message)
      }
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (res) {
    debugger;
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      // title: '邀请代理商',
      path: this.data.dataInfo.jump_url,
      imageUrl: "../../../assets/images/yaoqingdaili.png",
    }
  },
  
})